//
//  ZJPushViewController.m
//  zjzb
//
//  Created by Mac on 2017/3/24.
//  Copyright © 2017年 Mac. All rights reserved.
//

#import "ZJPushViewController.h"
#import "ZJLiveViewController.h"

@interface ZJPushViewController ()



@end

@implementation ZJPushViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    

    UIImageView *imageView =[[UIImageView alloc]initWithFrame:self.view.bounds];
    
    imageView.image =[UIImage imageNamed:@"bg_zbfx"];
    
    imageView.userInteractionEnabled = YES;
    
    
    [self.view addSubview:imageView];
    
    UIImage *image1 = [UIImage imageNamed:@"room_button"];
    
    UIButton *button = [[UIButton alloc]initWithFrame:CGRectMake(([UIScreen mainScreen].bounds.size.width-200)/2, 300, 200, 40)];
    
    [button setBackgroundImage:image1 forState:UIControlStateNormal];
    
    [button setTitle:@"点击开始直播" forState:UIControlStateNormal];
    
    [button setTintColor:DEF_RGBA_COLOR(0, 216, 201, 1)];
    
    [imageView addSubview:button];
    
    [button addTarget:self action:@selector(showSelf) forControlEvents:UIControlEventTouchUpInside];
    
    [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
    

}

-(void)showSelf {
    
    ZJLiveViewController *livc = [[ZJLiveViewController alloc]init];
    [self presentViewController:livc animated:NO completion:nil];
   
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void)dealloc{
    [[NSNotificationCenter defaultCenter]removeObserver:self];
}

@end
